﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.springframework.org/schema/mvc">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="taskItem">
    <table id="taskItem_table" style="width: 100%"></table>
</div>
<script th:inline="none" type="text/javascript">
    $('#taskItem_table').datagrid({
        fitColumns: true,
        striped: true,
        rownumbers: true,
        nowrap:false,
        columns: [[
            {field:'guocheng',title:'过程',width:150,align:'center'},
            {field: 'approvalsName', title: '处理人', width: 150, align: 'center'},
            {field:'startTime',title:'开始时间',width:150,align:'center'},
            {field:'endTime',title:'处理时间',width:150,align:'center'},
            {field:'cause',title:'原因',width:250,align:'center'},
            {
                field: 'status', title: '审批情况', width: 150, align: 'center',
                formatter: function (value, row, index) {
                    if (value == 0) {
                        return "提交";
                    } else if (value == 1) {
                        return "<span style='color: green'>同意</span>";
                    } else if (value == 2) {
                        return "驳回";
                    } else if (value == 3) {
                        return "<span style='color: red'>拒绝</span>";
                    } else if (value == 4) {
                        return "同意-审核结束";
                    }else if (value == 5) {
                            return "重新提交";
                    }else if (value==-1) {
                        return "处理中";
                    }else if (value==6) {
                        return "<span style='color: #00FF00'>已接收</span>";
                    }
                }
            }
        ]]
    })
</script>
</body>
</html>